﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<SDT.Site.ViewModels.ArticleListViewModel>" %>
<%@ Import Namespace="SDT.Lib.Helpers" %>
<%if (Model.Articles != null && Model.Articles.Count > 0)
     {
         var first = Model.Articles[0]; %>
<div class="bor_cor mar_t" >
      	<div class="bar_org" align="center">&nbsp;<%=ViewData["Title"] %></div>
        <div class="tv_tivi" style="padding:3px">
            <a href="/readers/details/<%=first.ID %>/<%=Html.ToUrlFriendly(first.Title)%>">
                <% string imgPath = (first.ImagePath != null && first.ImagePath != string.Empty) ? SDT.Lib.Common.Utils.GenThumbnail(first.ID, 266, 186, first.ImagePath, Model.ImagePath, Model.RootImageUrl) : SDT.Lib.Common.Globals.DefaultLogo; %>
                <img src="<%=imgPath %>" title="<%=first.Title %>" alt="<%=first.Title %>" class="bor_img" width="266" height="186" style="overflow:hidden"/>
            </a>
            <h3><a href="/readers/details/<%=first.ID %>/<%=Html.ToUrlFriendly(first.Title)%>" class="link_org"><%=Html.Encode(first.Title) %></a></h3>
        </div>  
        <div class="new_list">
            <%if (Model.Articles.Count > 1)
            { %>
            <ul>
              <%for(int i=1;i<Model.Articles.Count; i++){
                 %>
                <li><a href="/readers/details/<%=Model.Articles[i].ID %>/<%=Html.ToUrlFriendly(Model.Articles[i].Title)%>"><%=Html.Encode(Model.Articles[i].Title)%></a></li>              
               <%} %>
            </ul>
          <%} %>
        </div>
</div>
<%} %>


